package org.micode.common.domain;

import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 键值分页查询对象
 * @param <T>
 */
@Data
public class KeyQuery<T> {

    /**
     * 查询的键值
     */
    @NotNull
    private T key;

    /**
     * 分页对象
     */
    @NotNull
    private Page page;

    public KeyQuery() {

    }

    public KeyQuery(T key, Page page) {
        this();
        this.page = page;
        this.key = key;
    }

}
